package com.xbongbong.pro.score.pojo.dto;

import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;
import java.util.Objects;

/**
 * 评分规则列表 新建 dto
 */
@Data
public class ScoreRuleSaveDTO extends BaseDTO {
    private static final long serialVersionUID = 3528955007420505116L;

    @NotNull(message = "{dto.msg.score.menuId.NotNull}")
    private Long menuId;
    /**
     * appId
     */
    @NotNull(message = "{dto.msg.score.appId.NotNull}")
    private Long appId;
    /**
     * formID
     */
    @NotNull(message = "{dto.msg.score.formId.NotNull}")
    private Long formId;

    /**
     * 数据主键为空表示新增，否则是编辑
     */
    private Long dataId;

    /**
     * 业务类型
     */
    @NotNull(message = "{dto.msg.score.businessType.NotNull}")
    private Integer businessType;


    /**
     * 评分规则名称
     */
    @NotNull(message = "{dto.msg.score.businessType.NotNull}")
    @Size(max=30,   message ="{dto.msg.score.ruleName.Max}" )
    private String ruleName;

    /**
     * 画像评分权重占比
     */
    @NotNull(message = "{dto.msg.score.portraitScoreRate.NotNull}")
    private Double  portraitScoreRate;

    /**
     * 画像评分
     */
    private List<ScoreFieldConditionDTO> portraitScoreRule;

    /**
     * 行为评分权重占比
     */
    @NotNull(message = "{dto.msg.score.actionScoreRate.NotNull}")
    private Double  actionScoreRate;

    /**
     * 行为评分
     */
    private List<ScoreFieldConditionDTO> actionScoreRule;

    /**
     * 是否启用
     */
    private Integer enable;

    private String creatorId;

    private Long  addTime;

    private Long  updateTime;

}
